const { Sequelize, Model } = require('sequelize')
const { sequelize } = require('../../core/db')

class HomeService extends Model {}

HomeService.init({
  id: {
    type: Sequelize.INTEGER,
    autoIncrement: true,
    primaryKey: true
  },
  cName: Sequelize.STRING(20),
  eName: Sequelize.STRING(50),  
  imgSrc: Sequelize.STRING(300),
  orderNum: {
    type: Sequelize.INTEGER,
    defaultValue: 1
  },
  Desc: Sequelize.STRING(200)
}, {
  sequelize
})

module.exports = HomeService